window: Make code snippets compile
authorTimm Bäder <mail@baedert.org>
Wed, 11 Oct 2017 11:16:23 +0000 (13:16 +0200)
committerTimm Bäder <mail@baedert.org>
Thu, 12 Oct 2017 13:42:03 +0000 (15:42 +0200)
Fix the wrong signature of a size_allocate signal handler

gtk/gtkwindow.c

index 4995e3867d358dee953add55640823d25fb555cc..c259373cfdfd2477677a62a3a2c488734c87f661 100644 (file)
@@ -5339,7 +5339,9 @@ gtk_window_resize (GtkWindow *window,
  * way that this code:
  *
  * |[<!-- language="C" -->
- *   // width and height are set elsewhere
+ *   GtkWindow *window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ *   int width = 500;
+ *   int height = 300;
  *   gtk_window_resize (window, width, height);
  *
  *   int new_width, new_height;
@@ -5367,13 +5369,16 @@ gtk_window_resize (GtkWindow *window,
  *
  * |[<!-- language="C" -->
  * static void
- * on_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
+ * on_size_allocate (GtkWidget *widget,
+ *                   const GtkAllocation *allocation,
+ *                   int baseline,
+ *                   GtkAllocation *out_clip)
  * {
  *   int new_width, new_height;
  *
  *   gtk_window_get_size (GTK_WINDOW (widget), &new_width, &new_height);
  *
- *   ...
+ *   // ...
  * }
  * ]|
  *